package string;

/**
 * created by flyketch
 * 20-1-14 上午9:03
 */
public class StringTest {
    public static void main(String[] args) {
        String a = "hello";
        if (a.contains("h") && !a.contains("he")) {
            System.out.println("yes");
        } else {
            System.out.println("no");
        }

        String b = "你们的主任";
        if (b.indexOf("主任") >= 0 && b.indexOf("副") == -1) {
            System.out.println("ok");
        } else {
            System.out.println("not ok");
        }
    }
}
